package com.dailyblue.java.project.smbms.order.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface OrderMapper {
    // 订单概述
    @Insert("insert into smbms_order values(null,#{aid},now(),1,#{payId})")
    int saveOrderSummary(@Param("aid") int aid, @Param("payId") String payId);

    // 订单详情
    @Insert("insert into smbms_order_details values(null,#{orderId},#{gid},#{num},1)")
    int saveOrderDetails(@Param("orderId") String orderId, @Param("gid") int gid, @Param("num") int num);

}
